Skip to content

fix: resolve multi-app deployment blockers#3

Merged
baijum merged 1 commit into
mainfrom
fix/multi-app-deploy
Mar 15, 2026
Merged

fix: resolve multi-app deployment blockers#3
baijum merged 1 commit into
mainfrom
fix/multi-app-deploy

Conversation

@baijum

@baijum baijum commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add .env existence guard — deploy fails fast if not configured on the server
  • Auto-create per-app database via platform postgres (e.g., todo-apptodo_app_db)
  • Generate Caddyfile with literal domain and project-prefixed container name (<app>-app-1) instead of symlinking — fixes env var resolution and container name ambiguity when multiple apps share the towlion network
  • Update env.template with placeholders and comments for multi-app setup

Context

Phase 3 (Automated Deployments) requires multiple apps on one server. Two blockers existed:

  1. Caddy couldn't resolve app domains — the template Caddyfile uses {$APP_DOMAIN} but platform Caddy has no access to each app's .env, and reverse_proxy app:8000 is ambiguous across projects
  2. All apps shared one database — env.template hardcoded app_db

Test plan

  • Spec validator passes 28/28 at Tier 2 (verified locally)
  • Review deploy.yml YAML syntax
  • Confirm Docker Compose project naming: /opt/apps/todo-app/ → container todo-app-app-1
  • Confirm DB name sanitization: tr '-' '_' handles hyphens (GitHub repo convention)
  • Deploy a second app to a test server and verify both apps resolve correctly

🤖 Generated with Claude Code

- Add .env existence guard to fail fast on first deploy if not configured
- Auto-create per-app database via platform postgres (e.g., todo_app_db)
- Generate Caddyfile with literal domain and project-prefixed container
  name instead of symlinking (fixes env var and container name ambiguity)
- Update env.template with placeholders and comments for multi-app setup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@baijum baijum merged commit 9441709 into main Mar 15, 2026
2 checks passed
@baijum baijum deleted the fix/multi-app-deploy branch March 15, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant